package org.cycuchy.kapsel {
	
	import flash.events.TextEvent;
	
	import mx.controls.Text;
	import mx.core.Application;

	public class KApplication extends Application {
		
		public var txt:Text;
		public var lcc:KLandscapeCanvas;
		
		public function KApplication():void {
			super();
		}
		
		override protected function childrenCreated():void {
			super.childrenCreated()
			addEventListener(TextEvent.LINK, link);
			var s:String = lcc.txt();
			txt.htmlText = s; 
		}
		
		private function link(event:TextEvent):void {
			lcc.f(parseInt(event.text));
		}
		
	}
	
}